import java.util.LinkedList;
import java.util.Queue;
//队列
public class Test {
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);

        System.out.println(queue.poll()); //出队列
        System.out.println(queue.peek()); //获取队头元素但是不删除
        System.out.println(queue.isEmpty());
    }

    public static void main(String[] args) {
        Queue1 queue = new Queue1();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        System.out.println(queue.poll());
        System.out.println(queue.peek());
        System.out.println(queue.getUsedSize());
    }
}
